//
//  SINATecCourseModel.m
//  sinashebao
//
//  Created by  androidlongs on 2018/1/10.
//  Copyright © 2018年  androidlongs. All rights reserved.
// 课程model

#import "SINATecCourseModel.h"

@implementation SINATecCourseModel

-(instancetype)initWithDict:(NSDictionary *)result{
    if (self=[super init]) {
        /*
         "name": "离散数学",
         "subjectid": 11
         
         */
        
        _courseTitle=result[@"name"];
        _courseId=result[@"subjectid"];
        
        _classifyid=[result[@"classifyid"] integerValue];
        /*
         {
         "score": 56.0,
         "username": "刘德华"
         }
         */
        
        _score=result[@"score"];
        _username=result[@"username"];
        
        /*
         "uuid": "fef0ee3efd18489881623ed1asfas4",
         "realname": "周润发"
         */
        
        _uuid=result[@"uuid"];
        _realname=result[@"realname"];

        /*
         {
         "subjectname": "语文",
         "score": 89.0,
         "teachername": "樊老师"
         }, 
         */
        _teachername=result[@"teachername"];
        _subjectname=result[@"subjectname"];
        
        /*
         "lessonperiod": 30,
         "signcnt": 2,
         "uuid": "fef0ee3efd18489881623ed199e4ed74",
         "realname": "李四"
         */
        _lessonperiod=result[@"lessonperiod"];
        _signcnt=result[@"signcnt"];
        
        
        
        /*
         
         "weekdayinfo": 3,
         "name": "语文",
         "endtime": 1504598400000,
         "starttime": 1504591200000,
         "classtime": 1504540800000
         */
        _weekdayinfo=result[@"weekdayinfo"];
        _name=result[@"name"];
        _endtime=result[@"endtime"];
        _starttime=result[@"starttime"];
        _classtime=result[@"classtime"];
        
        /*
         
         {
         "lessonperiod": 150,
         "signcnt": 3,
         "schoolyear": "2017 - 2018",
         "term": "上半学期",
         "realname": "赵七"
         }
         */
        _schoolyear=result[@"schoolyear"];
        _term=result[@"term"];
        
        
        /*
         {
         "universityid": 1,
         "name": "马列部",
         "uuid": "12321412"
         },

         */
         _universityid=result[@"universityid"];
    }
    return self;
}
+(instancetype)userWithDict:(NSDictionary *)dict{
    return [[self alloc] initWithDict:dict];
}
@end
